<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加地址</title>
    <link rel="stylesheet" href="css/global.css">
    <link rel="stylesheet" href="css/address_add.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>

    <script>
        $(function () {
            $("#return").click(function () {
                window.location.href = "addressManage.html"
            })
        })
        // function addaddress() {
        //     var consignee = document.querySelector('#consignee').value
        //     var addressDdetails = document.querySelector('#addressDdetails').value
        //     var addressPhone = document.querySelector('#addressPhone').value
        //     var addressStatus = document.querySelector('#addressStatus').value
        //     $.ajax({
        //         url: 'http://localhost:3000/api/addAddress',
        //         type: 'get',
        //         data: {consignee: consignee, address_details: addressDdetails,  address_phone:addressPhone,address_status:addressStatus },
        //         success: function (result) {
        //             console.log(result)
        //             if (result.message == 'ok') {
        //                 alert('添加成功！')
        //                 localStorage.setItem('currentUser',JSON.stringify(result.data))
        //                 location.href = 'http://localhost:5502/addressManage.html'
        //             } else {
        //                 alert('添加失败！')
        //             }
        //         }
        //     })
        // }
    </script>
</head>

<body>

    <div class="outer">
        <input type="button" name="" value="确认添加"  onclick="addaddress()">
        <button id="return">返回</button>
        <div class="address_add">
            <span id="consignee">收件人：</span><input type="text"></input><br>
            <span id="addressDdetails">详情地址：</span><input type="text"></input><br>
            <span id="addressPhone">电话:</span><input type="text"></input><br>
            <span id="addressStatus">地址状态:</span><input type="text"></input><br>
        </div>
    </div>
    <tr></tr>
</body>

</html>